package com.newasia.server.dal.entitys;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class ActiveExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public ActiveExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andSidIsNull() {
            addCriterion("sid is null");
            return (Criteria) this;
        }

        public Criteria andSidIsNotNull() {
            addCriterion("sid is not null");
            return (Criteria) this;
        }

        public Criteria andSidEqualTo(String value) {
            addCriterion("sid =", value, "sid");
            return (Criteria) this;
        }

        public Criteria andSidNotEqualTo(String value) {
            addCriterion("sid <>", value, "sid");
            return (Criteria) this;
        }

        public Criteria andSidGreaterThan(String value) {
            addCriterion("sid >", value, "sid");
            return (Criteria) this;
        }

        public Criteria andSidGreaterThanOrEqualTo(String value) {
            addCriterion("sid >=", value, "sid");
            return (Criteria) this;
        }

        public Criteria andSidLessThan(String value) {
            addCriterion("sid <", value, "sid");
            return (Criteria) this;
        }

        public Criteria andSidLessThanOrEqualTo(String value) {
            addCriterion("sid <=", value, "sid");
            return (Criteria) this;
        }

        public Criteria andSidLike(String value) {
            addCriterion("sid like", value, "sid");
            return (Criteria) this;
        }

        public Criteria andSidNotLike(String value) {
            addCriterion("sid not like", value, "sid");
            return (Criteria) this;
        }

        public Criteria andSidIn(List<String> values) {
            addCriterion("sid in", values, "sid");
            return (Criteria) this;
        }

        public Criteria andSidNotIn(List<String> values) {
            addCriterion("sid not in", values, "sid");
            return (Criteria) this;
        }

        public Criteria andSidBetween(String value1, String value2) {
            addCriterion("sid between", value1, value2, "sid");
            return (Criteria) this;
        }

        public Criteria andSidNotBetween(String value1, String value2) {
            addCriterion("sid not between", value1, value2, "sid");
            return (Criteria) this;
        }

        public Criteria andIdIsNull() {
            addCriterion("ID is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("ID is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Long value) {
            addCriterion("ID =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Long value) {
            addCriterion("ID <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Long value) {
            addCriterion("ID >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Long value) {
            addCriterion("ID >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Long value) {
            addCriterion("ID <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Long value) {
            addCriterion("ID <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Long> values) {
            addCriterion("ID in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Long> values) {
            addCriterion("ID not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Long value1, Long value2) {
            addCriterion("ID between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Long value1, Long value2) {
            addCriterion("ID not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andTimeIsNull() {
            addCriterion("time is null");
            return (Criteria) this;
        }

        public Criteria andTimeIsNotNull() {
            addCriterion("time is not null");
            return (Criteria) this;
        }

        public Criteria andTimeEqualTo(Date value) {
            addCriterion("time =", value, "time");
            return (Criteria) this;
        }

        public Criteria andTimeNotEqualTo(Date value) {
            addCriterion("time <>", value, "time");
            return (Criteria) this;
        }

        public Criteria andTimeGreaterThan(Date value) {
            addCriterion("time >", value, "time");
            return (Criteria) this;
        }

        public Criteria andTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("time >=", value, "time");
            return (Criteria) this;
        }

        public Criteria andTimeLessThan(Date value) {
            addCriterion("time <", value, "time");
            return (Criteria) this;
        }

        public Criteria andTimeLessThanOrEqualTo(Date value) {
            addCriterion("time <=", value, "time");
            return (Criteria) this;
        }

        public Criteria andTimeIn(List<Date> values) {
            addCriterion("time in", values, "time");
            return (Criteria) this;
        }

        public Criteria andTimeNotIn(List<Date> values) {
            addCriterion("time not in", values, "time");
            return (Criteria) this;
        }

        public Criteria andTimeBetween(Date value1, Date value2) {
            addCriterion("time between", value1, value2, "time");
            return (Criteria) this;
        }

        public Criteria andTimeNotBetween(Date value1, Date value2) {
            addCriterion("time not between", value1, value2, "time");
            return (Criteria) this;
        }

        public Criteria andKeepIsNull() {
            addCriterion("keep is null");
            return (Criteria) this;
        }

        public Criteria andKeepIsNotNull() {
            addCriterion("keep is not null");
            return (Criteria) this;
        }

        public Criteria andKeepEqualTo(Integer value) {
            addCriterion("keep =", value, "keep");
            return (Criteria) this;
        }

        public Criteria andKeepNotEqualTo(Integer value) {
            addCriterion("keep <>", value, "keep");
            return (Criteria) this;
        }

        public Criteria andKeepGreaterThan(Integer value) {
            addCriterion("keep >", value, "keep");
            return (Criteria) this;
        }

        public Criteria andKeepGreaterThanOrEqualTo(Integer value) {
            addCriterion("keep >=", value, "keep");
            return (Criteria) this;
        }

        public Criteria andKeepLessThan(Integer value) {
            addCriterion("keep <", value, "keep");
            return (Criteria) this;
        }

        public Criteria andKeepLessThanOrEqualTo(Integer value) {
            addCriterion("keep <=", value, "keep");
            return (Criteria) this;
        }

        public Criteria andKeepIn(List<Integer> values) {
            addCriterion("keep in", values, "keep");
            return (Criteria) this;
        }

        public Criteria andKeepNotIn(List<Integer> values) {
            addCriterion("keep not in", values, "keep");
            return (Criteria) this;
        }

        public Criteria andKeepBetween(Integer value1, Integer value2) {
            addCriterion("keep between", value1, value2, "keep");
            return (Criteria) this;
        }

        public Criteria andKeepNotBetween(Integer value1, Integer value2) {
            addCriterion("keep not between", value1, value2, "keep");
            return (Criteria) this;
        }

        public Criteria andKeepfnIsNull() {
            addCriterion("keepFn is null");
            return (Criteria) this;
        }

        public Criteria andKeepfnIsNotNull() {
            addCriterion("keepFn is not null");
            return (Criteria) this;
        }

        public Criteria andKeepfnEqualTo(Integer value) {
            addCriterion("keepFn =", value, "keepfn");
            return (Criteria) this;
        }

        public Criteria andKeepfnNotEqualTo(Integer value) {
            addCriterion("keepFn <>", value, "keepfn");
            return (Criteria) this;
        }

        public Criteria andKeepfnGreaterThan(Integer value) {
            addCriterion("keepFn >", value, "keepfn");
            return (Criteria) this;
        }

        public Criteria andKeepfnGreaterThanOrEqualTo(Integer value) {
            addCriterion("keepFn >=", value, "keepfn");
            return (Criteria) this;
        }

        public Criteria andKeepfnLessThan(Integer value) {
            addCriterion("keepFn <", value, "keepfn");
            return (Criteria) this;
        }

        public Criteria andKeepfnLessThanOrEqualTo(Integer value) {
            addCriterion("keepFn <=", value, "keepfn");
            return (Criteria) this;
        }

        public Criteria andKeepfnIn(List<Integer> values) {
            addCriterion("keepFn in", values, "keepfn");
            return (Criteria) this;
        }

        public Criteria andKeepfnNotIn(List<Integer> values) {
            addCriterion("keepFn not in", values, "keepfn");
            return (Criteria) this;
        }

        public Criteria andKeepfnBetween(Integer value1, Integer value2) {
            addCriterion("keepFn between", value1, value2, "keepfn");
            return (Criteria) this;
        }

        public Criteria andKeepfnNotBetween(Integer value1, Integer value2) {
            addCriterion("keepFn not between", value1, value2, "keepfn");
            return (Criteria) this;
        }

        public Criteria andMenoIsNull() {
            addCriterion("meno is null");
            return (Criteria) this;
        }

        public Criteria andMenoIsNotNull() {
            addCriterion("meno is not null");
            return (Criteria) this;
        }

        public Criteria andMenoEqualTo(String value) {
            addCriterion("meno =", value, "meno");
            return (Criteria) this;
        }

        public Criteria andMenoNotEqualTo(String value) {
            addCriterion("meno <>", value, "meno");
            return (Criteria) this;
        }

        public Criteria andMenoGreaterThan(String value) {
            addCriterion("meno >", value, "meno");
            return (Criteria) this;
        }

        public Criteria andMenoGreaterThanOrEqualTo(String value) {
            addCriterion("meno >=", value, "meno");
            return (Criteria) this;
        }

        public Criteria andMenoLessThan(String value) {
            addCriterion("meno <", value, "meno");
            return (Criteria) this;
        }

        public Criteria andMenoLessThanOrEqualTo(String value) {
            addCriterion("meno <=", value, "meno");
            return (Criteria) this;
        }

        public Criteria andMenoLike(String value) {
            addCriterion("meno like", value, "meno");
            return (Criteria) this;
        }

        public Criteria andMenoNotLike(String value) {
            addCriterion("meno not like", value, "meno");
            return (Criteria) this;
        }

        public Criteria andMenoIn(List<String> values) {
            addCriterion("meno in", values, "meno");
            return (Criteria) this;
        }

        public Criteria andMenoNotIn(List<String> values) {
            addCriterion("meno not in", values, "meno");
            return (Criteria) this;
        }

        public Criteria andMenoBetween(String value1, String value2) {
            addCriterion("meno between", value1, value2, "meno");
            return (Criteria) this;
        }

        public Criteria andMenoNotBetween(String value1, String value2) {
            addCriterion("meno not between", value1, value2, "meno");
            return (Criteria) this;
        }

        public Criteria andLaststoptimeIsNull() {
            addCriterion("lastStopTime is null");
            return (Criteria) this;
        }

        public Criteria andLaststoptimeIsNotNull() {
            addCriterion("lastStopTime is not null");
            return (Criteria) this;
        }

        public Criteria andLaststoptimeEqualTo(Date value) {
            addCriterion("lastStopTime =", value, "laststoptime");
            return (Criteria) this;
        }

        public Criteria andLaststoptimeNotEqualTo(Date value) {
            addCriterion("lastStopTime <>", value, "laststoptime");
            return (Criteria) this;
        }

        public Criteria andLaststoptimeGreaterThan(Date value) {
            addCriterion("lastStopTime >", value, "laststoptime");
            return (Criteria) this;
        }

        public Criteria andLaststoptimeGreaterThanOrEqualTo(Date value) {
            addCriterion("lastStopTime >=", value, "laststoptime");
            return (Criteria) this;
        }

        public Criteria andLaststoptimeLessThan(Date value) {
            addCriterion("lastStopTime <", value, "laststoptime");
            return (Criteria) this;
        }

        public Criteria andLaststoptimeLessThanOrEqualTo(Date value) {
            addCriterion("lastStopTime <=", value, "laststoptime");
            return (Criteria) this;
        }

        public Criteria andLaststoptimeIn(List<Date> values) {
            addCriterion("lastStopTime in", values, "laststoptime");
            return (Criteria) this;
        }

        public Criteria andLaststoptimeNotIn(List<Date> values) {
            addCriterion("lastStopTime not in", values, "laststoptime");
            return (Criteria) this;
        }

        public Criteria andLaststoptimeBetween(Date value1, Date value2) {
            addCriterion("lastStopTime between", value1, value2, "laststoptime");
            return (Criteria) this;
        }

        public Criteria andLaststoptimeNotBetween(Date value1, Date value2) {
            addCriterion("lastStopTime not between", value1, value2, "laststoptime");
            return (Criteria) this;
        }

        public Criteria andStoptimeIsNull() {
            addCriterion("stoptime is null");
            return (Criteria) this;
        }

        public Criteria andStoptimeIsNotNull() {
            addCriterion("stoptime is not null");
            return (Criteria) this;
        }

        public Criteria andStoptimeEqualTo(Date value) {
            addCriterion("stoptime =", value, "stoptime");
            return (Criteria) this;
        }

        public Criteria andStoptimeNotEqualTo(Date value) {
            addCriterion("stoptime <>", value, "stoptime");
            return (Criteria) this;
        }

        public Criteria andStoptimeGreaterThan(Date value) {
            addCriterion("stoptime >", value, "stoptime");
            return (Criteria) this;
        }

        public Criteria andStoptimeGreaterThanOrEqualTo(Date value) {
            addCriterion("stoptime >=", value, "stoptime");
            return (Criteria) this;
        }

        public Criteria andStoptimeLessThan(Date value) {
            addCriterion("stoptime <", value, "stoptime");
            return (Criteria) this;
        }

        public Criteria andStoptimeLessThanOrEqualTo(Date value) {
            addCriterion("stoptime <=", value, "stoptime");
            return (Criteria) this;
        }

        public Criteria andStoptimeIn(List<Date> values) {
            addCriterion("stoptime in", values, "stoptime");
            return (Criteria) this;
        }

        public Criteria andStoptimeNotIn(List<Date> values) {
            addCriterion("stoptime not in", values, "stoptime");
            return (Criteria) this;
        }

        public Criteria andStoptimeBetween(Date value1, Date value2) {
            addCriterion("stoptime between", value1, value2, "stoptime");
            return (Criteria) this;
        }

        public Criteria andStoptimeNotBetween(Date value1, Date value2) {
            addCriterion("stoptime not between", value1, value2, "stoptime");
            return (Criteria) this;
        }

        public Criteria andSmslevelIsNull() {
            addCriterion("smslevel is null");
            return (Criteria) this;
        }

        public Criteria andSmslevelIsNotNull() {
            addCriterion("smslevel is not null");
            return (Criteria) this;
        }

        public Criteria andSmslevelEqualTo(Integer value) {
            addCriterion("smslevel =", value, "smslevel");
            return (Criteria) this;
        }

        public Criteria andSmslevelNotEqualTo(Integer value) {
            addCriterion("smslevel <>", value, "smslevel");
            return (Criteria) this;
        }

        public Criteria andSmslevelGreaterThan(Integer value) {
            addCriterion("smslevel >", value, "smslevel");
            return (Criteria) this;
        }

        public Criteria andSmslevelGreaterThanOrEqualTo(Integer value) {
            addCriterion("smslevel >=", value, "smslevel");
            return (Criteria) this;
        }

        public Criteria andSmslevelLessThan(Integer value) {
            addCriterion("smslevel <", value, "smslevel");
            return (Criteria) this;
        }

        public Criteria andSmslevelLessThanOrEqualTo(Integer value) {
            addCriterion("smslevel <=", value, "smslevel");
            return (Criteria) this;
        }

        public Criteria andSmslevelIn(List<Integer> values) {
            addCriterion("smslevel in", values, "smslevel");
            return (Criteria) this;
        }

        public Criteria andSmslevelNotIn(List<Integer> values) {
            addCriterion("smslevel not in", values, "smslevel");
            return (Criteria) this;
        }

        public Criteria andSmslevelBetween(Integer value1, Integer value2) {
            addCriterion("smslevel between", value1, value2, "smslevel");
            return (Criteria) this;
        }

        public Criteria andSmslevelNotBetween(Integer value1, Integer value2) {
            addCriterion("smslevel not between", value1, value2, "smslevel");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}